package com.example.travel.service;

import com.example.travel.mapper.GroupMapper;
import com.example.travel.pojo.orm.Group;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GroupService {
    @Autowired
    private GroupMapper mapper;
    public List<Group> getAllGroup(){
        return mapper.getAllGroup();
    }

    public Group getGroupById(int groupId){
        return mapper.getGroupById(groupId);
    }

    public int addGroup(Group group){
        return mapper.addGroup(group);
    }

    public int updateGroup(Group group){
        return mapper.updateGroup(group);
    }

    public int deleteGroup(int groupId){
        return mapper.deleteGroup(groupId);
    }
}
